Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

PROPER(fst(X)) → FST(proper(X))
ACTIVE(natsFrom(N)) → NATSFROM(s(N))
ACTIVE(fst(X)) → FST(active(X))
ACTIVE(take(X1, X2)) → TAKE(X1, active(X2))
ACTIVE(afterNth(N, XS)) → SND(splitAt(N, XS))
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
AFTERNTH(X1, mark(X2)) → AFTERNTH(X1, X2)
ACTIVE(splitAt(0, XS)) → PAIR(nil, XS)
SEL(ok(X1), ok(X2)) → SEL(X1, X2)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X1)
ACTIVE(afterNth(N, XS)) → SPLITAT(N, XS)
FST(mark(X)) → FST(X)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
PROPER(U12(X1, X2)) → PROPER(X1)
SND(ok(X)) → SND(X)
ACTIVE(snd(X)) → ACTIVE(X)
ACTIVE(U12(pair(YS, ZS), X)) → CONS(X, YS)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X3)
PROPER(sel(X1, X2)) → PROPER(X2)
ACTIVE(take(X1, X2)) → TAKE(active(X1), X2)
PROPER(U12(X1, X2)) → PROPER(X2)
SND(mark(X)) → SND(X)
PROPER(splitAt(X1, X2)) → SPLITAT(proper(X1), proper(X2))
ACTIVE(s(X)) → ACTIVE(X)
PROPER(natsFrom(X)) → NATSFROM(proper(X))
ACTIVE(U11(X1, X2, X3, X4)) → U111(active(X1), X2, X3, X4)
ACTIVE(tail(X)) → ACTIVE(X)
PROPER(fst(X)) → PROPER(X)
S(ok(X)) → S(X)
ACTIVE(take(N, XS)) → FST(splitAt(N, XS))
CONS(mark(X1), X2) → CONS(X1, X2)
TOP(mark(X)) → PROPER(X)
PAIR(mark(X1), X2) → PAIR(X1, X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X2)
ACTIVE(and(X1, X2)) → AND(active(X1), X2)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X4)
TOP(ok(X)) → ACTIVE(X)
PROPER(and(X1, X2)) → AND(proper(X1), proper(X2))
SPLITAT(mark(X1), X2) → SPLITAT(X1, X2)
ACTIVE(sel(N, XS)) → HEAD(afterNth(N, XS))
FST(ok(X)) → FST(X)
PROPER(cons(X1, X2)) → PROPER(X1)
AFTERNTH(ok(X1), ok(X2)) → AFTERNTH(X1, X2)
PROPER(tail(X)) → PROPER(X)
ACTIVE(fst(X)) → ACTIVE(X)
ACTIVE(afterNth(X1, X2)) → AFTERNTH(X1, active(X2))
PROPER(afterNth(X1, X2)) → PROPER(X1)
S(mark(X)) → S(X)
ACTIVE(natsFrom(X)) → ACTIVE(X)
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
PROPER(and(X1, X2)) → PROPER(X1)
ACTIVE(snd(X)) → SND(active(X))
PROPER(pair(X1, X2)) → PROPER(X1)
PROPER(head(X)) → HEAD(proper(X))
ACTIVE(afterNth(X1, X2)) → ACTIVE(X1)
U111(ok(X1), ok(X2), ok(X3), ok(X4)) → U111(X1, X2, X3, X4)
PROPER(natsFrom(X)) → PROPER(X)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X1)
AND(mark(X1), X2) → AND(X1, X2)
ACTIVE(head(X)) → ACTIVE(X)
U121(mark(X1), X2) → U121(X1, X2)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → SPLITAT(X1, active(X2))
U121(ok(X1), ok(X2)) → U121(X1, X2)
ACTIVE(afterNth(X1, X2)) → AFTERNTH(active(X1), X2)
ACTIVE(sel(X1, X2)) → SEL(active(X1), X2)
ACTIVE(splitAt(s(N), cons(X, XS))) → U111(tt, N, X, XS)
ACTIVE(pair(X1, X2)) → ACTIVE(X1)
ACTIVE(take(N, XS)) → SPLITAT(N, XS)
ACTIVE(sel(X1, X2)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → SPLITAT(active(X1), X2)
ACTIVE(pair(X1, X2)) → PAIR(X1, active(X2))
PROPER(afterNth(X1, X2)) → AFTERNTH(proper(X1), proper(X2))
PROPER(head(X)) → PROPER(X)
HEAD(mark(X)) → HEAD(X)
PROPER(snd(X)) → SND(proper(X))
ACTIVE(U11(tt, N, X, XS)) → SPLITAT(N, XS)
ACTIVE(U11(X1, X2, X3, X4)) → ACTIVE(X1)
PAIR(ok(X1), ok(X2)) → PAIR(X1, X2)
PROPER(cons(X1, X2)) → PROPER(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X2)
U111(mark(X1), X2, X3, X4) → U111(X1, X2, X3, X4)
ACTIVE(U12(pair(YS, ZS), X)) → PAIR(cons(X, YS), ZS)
PROPER(sel(X1, X2)) → SEL(proper(X1), proper(X2))
PROPER(s(X)) → S(proper(X))
AFTERNTH(mark(X1), X2) → AFTERNTH(X1, X2)
PROPER(U12(X1, X2)) → U121(proper(X1), proper(X2))
PROPER(pair(X1, X2)) → PROPER(X2)
PROPER(tail(X)) → TAIL(proper(X))
ACTIVE(and(X1, X2)) → ACTIVE(X1)
NATSFROM(mark(X)) → NATSFROM(X)
TAIL(mark(X)) → TAIL(X)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X2)
PROPER(and(X1, X2)) → PROPER(X2)
ACTIVE(sel(N, XS)) → AFTERNTH(N, XS)
ACTIVE(head(X)) → HEAD(active(X))
SPLITAT(ok(X1), ok(X2)) → SPLITAT(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
PROPER(snd(X)) → PROPER(X)
PAIR(X1, mark(X2)) → PAIR(X1, X2)
ACTIVE(natsFrom(N)) → S(N)
PROPER(U11(X1, X2, X3, X4)) → U111(proper(X1), proper(X2), proper(X3), proper(X4))
ACTIVE(pair(X1, X2)) → ACTIVE(X2)
SPLITAT(X1, mark(X2)) → SPLITAT(X1, X2)
SEL(mark(X1), X2) → SEL(X1, X2)
PROPER(take(X1, X2)) → TAKE(proper(X1), proper(X2))
ACTIVE(take(X1, X2)) → ACTIVE(X2)
NATSFROM(ok(X)) → NATSFROM(X)
AND(ok(X1), ok(X2)) → AND(X1, X2)
PROPER(s(X)) → PROPER(X)
SEL(X1, mark(X2)) → SEL(X1, X2)
TAIL(ok(X)) → TAIL(X)
PROPER(take(X1, X2)) → PROPER(X2)
ACTIVE(pair(X1, X2)) → PAIR(active(X1), X2)
ACTIVE(tail(X)) → TAIL(active(X))
PROPER(afterNth(X1, X2)) → PROPER(X2)
TOP(ok(X)) → TOP(active(X))
TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
ACTIVE(sel(X1, X2)) → SEL(X1, active(X2))
PROPER(pair(X1, X2)) → PAIR(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X2)
PROPER(splitAt(X1, X2)) → PROPER(X2)
ACTIVE(natsFrom(X)) → NATSFROM(active(X))
TAKE(X1, mark(X2)) → TAKE(X1, X2)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(sel(X1, X2)) → PROPER(X1)
PROPER(splitAt(X1, X2)) → PROPER(X1)
ACTIVE(natsFrom(N)) → CONS(N, natsFrom(s(N)))
TOP(mark(X)) → TOP(proper(X))
ACTIVE(U11(tt, N, X, XS)) → U121(splitAt(N, XS), X)
HEAD(ok(X)) → HEAD(X)
ACTIVE(U12(X1, X2)) → U121(active(X1), X2)
ACTIVE(s(X)) → S(active(X))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

PROPER(fst(X)) → FST(proper(X))
ACTIVE(natsFrom(N)) → NATSFROM(s(N))
ACTIVE(fst(X)) → FST(active(X))
ACTIVE(take(X1, X2)) → TAKE(X1, active(X2))
ACTIVE(afterNth(N, XS)) → SND(splitAt(N, XS))
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
AFTERNTH(X1, mark(X2)) → AFTERNTH(X1, X2)
ACTIVE(splitAt(0, XS)) → PAIR(nil, XS)
SEL(ok(X1), ok(X2)) → SEL(X1, X2)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X1)
ACTIVE(afterNth(N, XS)) → SPLITAT(N, XS)
FST(mark(X)) → FST(X)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
PROPER(U12(X1, X2)) → PROPER(X1)
SND(ok(X)) → SND(X)
ACTIVE(snd(X)) → ACTIVE(X)
ACTIVE(U12(pair(YS, ZS), X)) → CONS(X, YS)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X3)
PROPER(sel(X1, X2)) → PROPER(X2)
ACTIVE(take(X1, X2)) → TAKE(active(X1), X2)
PROPER(U12(X1, X2)) → PROPER(X2)
SND(mark(X)) → SND(X)
PROPER(splitAt(X1, X2)) → SPLITAT(proper(X1), proper(X2))
ACTIVE(s(X)) → ACTIVE(X)
PROPER(natsFrom(X)) → NATSFROM(proper(X))
ACTIVE(U11(X1, X2, X3, X4)) → U111(active(X1), X2, X3, X4)
ACTIVE(tail(X)) → ACTIVE(X)
PROPER(fst(X)) → PROPER(X)
S(ok(X)) → S(X)
ACTIVE(take(N, XS)) → FST(splitAt(N, XS))
CONS(mark(X1), X2) → CONS(X1, X2)
TOP(mark(X)) → PROPER(X)
PAIR(mark(X1), X2) → PAIR(X1, X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X2)
ACTIVE(and(X1, X2)) → AND(active(X1), X2)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X4)
TOP(ok(X)) → ACTIVE(X)
PROPER(and(X1, X2)) → AND(proper(X1), proper(X2))
SPLITAT(mark(X1), X2) → SPLITAT(X1, X2)
ACTIVE(sel(N, XS)) → HEAD(afterNth(N, XS))
FST(ok(X)) → FST(X)
PROPER(cons(X1, X2)) → PROPER(X1)
AFTERNTH(ok(X1), ok(X2)) → AFTERNTH(X1, X2)
PROPER(tail(X)) → PROPER(X)
ACTIVE(fst(X)) → ACTIVE(X)
ACTIVE(afterNth(X1, X2)) → AFTERNTH(X1, active(X2))
PROPER(afterNth(X1, X2)) → PROPER(X1)
S(mark(X)) → S(X)
ACTIVE(natsFrom(X)) → ACTIVE(X)
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
PROPER(and(X1, X2)) → PROPER(X1)
ACTIVE(snd(X)) → SND(active(X))
PROPER(pair(X1, X2)) → PROPER(X1)
PROPER(head(X)) → HEAD(proper(X))
ACTIVE(afterNth(X1, X2)) → ACTIVE(X1)
U111(ok(X1), ok(X2), ok(X3), ok(X4)) → U111(X1, X2, X3, X4)
PROPER(natsFrom(X)) → PROPER(X)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X1)
AND(mark(X1), X2) → AND(X1, X2)
ACTIVE(head(X)) → ACTIVE(X)
U121(mark(X1), X2) → U121(X1, X2)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → SPLITAT(X1, active(X2))
U121(ok(X1), ok(X2)) → U121(X1, X2)
ACTIVE(afterNth(X1, X2)) → AFTERNTH(active(X1), X2)
ACTIVE(sel(X1, X2)) → SEL(active(X1), X2)
ACTIVE(splitAt(s(N), cons(X, XS))) → U111(tt, N, X, XS)
ACTIVE(pair(X1, X2)) → ACTIVE(X1)
ACTIVE(take(N, XS)) → SPLITAT(N, XS)
ACTIVE(sel(X1, X2)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → SPLITAT(active(X1), X2)
ACTIVE(pair(X1, X2)) → PAIR(X1, active(X2))
PROPER(afterNth(X1, X2)) → AFTERNTH(proper(X1), proper(X2))
PROPER(head(X)) → PROPER(X)
HEAD(mark(X)) → HEAD(X)
PROPER(snd(X)) → SND(proper(X))
ACTIVE(U11(tt, N, X, XS)) → SPLITAT(N, XS)
ACTIVE(U11(X1, X2, X3, X4)) → ACTIVE(X1)
PAIR(ok(X1), ok(X2)) → PAIR(X1, X2)
PROPER(cons(X1, X2)) → PROPER(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X2)
U111(mark(X1), X2, X3, X4) → U111(X1, X2, X3, X4)
ACTIVE(U12(pair(YS, ZS), X)) → PAIR(cons(X, YS), ZS)
PROPER(sel(X1, X2)) → SEL(proper(X1), proper(X2))
PROPER(s(X)) → S(proper(X))
AFTERNTH(mark(X1), X2) → AFTERNTH(X1, X2)
PROPER(U12(X1, X2)) → U121(proper(X1), proper(X2))
PROPER(pair(X1, X2)) → PROPER(X2)
PROPER(tail(X)) → TAIL(proper(X))
ACTIVE(and(X1, X2)) → ACTIVE(X1)
NATSFROM(mark(X)) → NATSFROM(X)
TAIL(mark(X)) → TAIL(X)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X2)
PROPER(and(X1, X2)) → PROPER(X2)
ACTIVE(sel(N, XS)) → AFTERNTH(N, XS)
ACTIVE(head(X)) → HEAD(active(X))
SPLITAT(ok(X1), ok(X2)) → SPLITAT(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
PROPER(snd(X)) → PROPER(X)
PAIR(X1, mark(X2)) → PAIR(X1, X2)
ACTIVE(natsFrom(N)) → S(N)
PROPER(U11(X1, X2, X3, X4)) → U111(proper(X1), proper(X2), proper(X3), proper(X4))
ACTIVE(pair(X1, X2)) → ACTIVE(X2)
SPLITAT(X1, mark(X2)) → SPLITAT(X1, X2)
SEL(mark(X1), X2) → SEL(X1, X2)
PROPER(take(X1, X2)) → TAKE(proper(X1), proper(X2))
ACTIVE(take(X1, X2)) → ACTIVE(X2)
NATSFROM(ok(X)) → NATSFROM(X)
AND(ok(X1), ok(X2)) → AND(X1, X2)
PROPER(s(X)) → PROPER(X)
SEL(X1, mark(X2)) → SEL(X1, X2)
TAIL(ok(X)) → TAIL(X)
PROPER(take(X1, X2)) → PROPER(X2)
ACTIVE(pair(X1, X2)) → PAIR(active(X1), X2)
ACTIVE(tail(X)) → TAIL(active(X))
PROPER(afterNth(X1, X2)) → PROPER(X2)
TOP(ok(X)) → TOP(active(X))
TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
ACTIVE(sel(X1, X2)) → SEL(X1, active(X2))
PROPER(pair(X1, X2)) → PAIR(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X2)
PROPER(splitAt(X1, X2)) → PROPER(X2)
ACTIVE(natsFrom(X)) → NATSFROM(active(X))
TAKE(X1, mark(X2)) → TAKE(X1, X2)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(sel(X1, X2)) → PROPER(X1)
PROPER(splitAt(X1, X2)) → PROPER(X1)
ACTIVE(natsFrom(N)) → CONS(N, natsFrom(s(N)))
TOP(mark(X)) → TOP(proper(X))
ACTIVE(U11(tt, N, X, XS)) → U121(splitAt(N, XS), X)
HEAD(ok(X)) → HEAD(X)
ACTIVE(U12(X1, X2)) → U121(active(X1), X2)
ACTIVE(s(X)) → S(active(X))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 18 SCCs with 52 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAKE(ok(X1), ok(X2)) → TAKE(X1, X2)
TAKE(mark(X1), X2) → TAKE(X1, X2)
TAKE(X1, mark(X2)) → TAKE(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAIL(ok(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TAIL(ok(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(mark(X1), X2) → SEL(X1, X2)
SEL(ok(X1), ok(X2)) → SEL(X1, X2)
SEL(X1, mark(X2)) → SEL(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(mark(X1), X2) → SEL(X1, X2)
SEL(ok(X1), ok(X2)) → SEL(X1, X2)
SEL(X1, mark(X2)) → SEL(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

NATSFROM(ok(X)) → NATSFROM(X)
NATSFROM(mark(X)) → NATSFROM(X)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

NATSFROM(ok(X)) → NATSFROM(X)
NATSFROM(mark(X)) → NATSFROM(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

HEAD(mark(X)) → HEAD(X)
HEAD(ok(X)) → HEAD(X)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

HEAD(mark(X)) → HEAD(X)
HEAD(ok(X)) → HEAD(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FST(ok(X)) → FST(X)
FST(mark(X)) → FST(X)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FST(ok(X)) → FST(X)
FST(mark(X)) → FST(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AND(mark(X1), X2) → AND(X1, X2)
AND(ok(X1), ok(X2)) → AND(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AND(mark(X1), X2) → AND(X1, X2)
AND(ok(X1), ok(X2)) → AND(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SND(mark(X)) → SND(X)
SND(ok(X)) → SND(X)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SND(mark(X)) → SND(X)
SND(ok(X)) → SND(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AFTERNTH(ok(X1), ok(X2)) → AFTERNTH(X1, X2)
AFTERNTH(mark(X1), X2) → AFTERNTH(X1, X2)
AFTERNTH(X1, mark(X2)) → AFTERNTH(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AFTERNTH(ok(X1), ok(X2)) → AFTERNTH(X1, X2)
AFTERNTH(mark(X1), X2) → AFTERNTH(X1, X2)
AFTERNTH(X1, mark(X2)) → AFTERNTH(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PAIR(ok(X1), ok(X2)) → PAIR(X1, X2)
PAIR(mark(X1), X2) → PAIR(X1, X2)
PAIR(X1, mark(X2)) → PAIR(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PAIR(ok(X1), ok(X2)) → PAIR(X1, X2)
PAIR(mark(X1), X2) → PAIR(X1, X2)
PAIR(X1, mark(X2)) → PAIR(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SPLITAT(X1, mark(X2)) → SPLITAT(X1, X2)
SPLITAT(mark(X1), X2) → SPLITAT(X1, X2)
SPLITAT(ok(X1), ok(X2)) → SPLITAT(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SPLITAT(X1, mark(X2)) → SPLITAT(X1, X2)
SPLITAT(mark(X1), X2) → SPLITAT(X1, X2)
SPLITAT(ok(X1), ok(X2)) → SPLITAT(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U121(mark(X1), X2) → U121(X1, X2)
U121(ok(X1), ok(X2)) → U121(X1, X2)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U121(mark(X1), X2) → U121(X1, X2)
U121(ok(X1), ok(X2)) → U121(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U111(mark(X1), X2, X3, X4) → U111(X1, X2, X3, X4)
U111(ok(X1), ok(X2), ok(X3), ok(X4)) → U111(X1, X2, X3, X4)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U111(mark(X1), X2, X3, X4) → U111(X1, X2, X3, X4)
U111(ok(X1), ok(X2), ok(X3), ok(X4)) → U111(X1, X2, X3, X4)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(U11(X1, X2, X3, X4)) → PROPER(X4)
PROPER(head(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
PROPER(tail(X)) → PROPER(X)
PROPER(take(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U12(X1, X2)) → PROPER(X1)
PROPER(afterNth(X1, X2)) → PROPER(X1)
PROPER(afterNth(X1, X2)) → PROPER(X2)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X3)
PROPER(and(X1, X2)) → PROPER(X1)
PROPER(pair(X1, X2)) → PROPER(X1)
PROPER(sel(X1, X2)) → PROPER(X2)
PROPER(U12(X1, X2)) → PROPER(X2)
PROPER(splitAt(X1, X2)) → PROPER(X2)
PROPER(pair(X1, X2)) → PROPER(X2)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X1)
PROPER(natsFrom(X)) → PROPER(X)
PROPER(and(X1, X2)) → PROPER(X2)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(splitAt(X1, X2)) → PROPER(X1)
PROPER(sel(X1, X2)) → PROPER(X1)
PROPER(snd(X)) → PROPER(X)
PROPER(fst(X)) → PROPER(X)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(head(X)) → PROPER(X)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X4)
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(tail(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(take(X1, X2)) → PROPER(X2)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X2)
PROPER(U12(X1, X2)) → PROPER(X1)
PROPER(afterNth(X1, X2)) → PROPER(X1)
PROPER(afterNth(X1, X2)) → PROPER(X2)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X3)
PROPER(and(X1, X2)) → PROPER(X1)
PROPER(pair(X1, X2)) → PROPER(X1)
PROPER(sel(X1, X2)) → PROPER(X2)
PROPER(U12(X1, X2)) → PROPER(X2)
PROPER(splitAt(X1, X2)) → PROPER(X2)
PROPER(pair(X1, X2)) → PROPER(X2)
PROPER(U11(X1, X2, X3, X4)) → PROPER(X1)
PROPER(natsFrom(X)) → PROPER(X)
PROPER(and(X1, X2)) → PROPER(X2)
PROPER(take(X1, X2)) → PROPER(X1)
PROPER(splitAt(X1, X2)) → PROPER(X1)
PROPER(sel(X1, X2)) → PROPER(X1)
PROPER(snd(X)) → PROPER(X)
PROPER(fst(X)) → PROPER(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(pair(X1, X2)) → ACTIVE(X2)
ACTIVE(snd(X)) → ACTIVE(X)
ACTIVE(pair(X1, X2)) → ACTIVE(X1)
ACTIVE(natsFrom(X)) → ACTIVE(X)
ACTIVE(take(X1, X2)) → ACTIVE(X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X2)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X1)
ACTIVE(and(X1, X2)) → ACTIVE(X1)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X2)
ACTIVE(U11(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X1)
ACTIVE(fst(X)) → ACTIVE(X)
ACTIVE(head(X)) → ACTIVE(X)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(take(X1, X2)) → ACTIVE(X1)
ACTIVE(tail(X)) → ACTIVE(X)

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(pair(X1, X2)) → ACTIVE(X2)
ACTIVE(snd(X)) → ACTIVE(X)
ACTIVE(pair(X1, X2)) → ACTIVE(X1)
ACTIVE(natsFrom(X)) → ACTIVE(X)
ACTIVE(take(X1, X2)) → ACTIVE(X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X2)
ACTIVE(sel(X1, X2)) → ACTIVE(X2)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X1)
ACTIVE(and(X1, X2)) → ACTIVE(X1)
ACTIVE(afterNth(X1, X2)) → ACTIVE(X2)
ACTIVE(U11(X1, X2, X3, X4)) → ACTIVE(X1)
ACTIVE(splitAt(X1, X2)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(head(X)) → ACTIVE(X)
ACTIVE(fst(X)) → ACTIVE(X)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(tail(X)) → ACTIVE(X)
ACTIVE(take(X1, X2)) → ACTIVE(X1)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U12(mark(X1), X2) → mark(U12(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
snd(mark(X)) → mark(snd(X))
and(mark(X1), X2) → mark(and(X1, X2))
fst(mark(X)) → mark(fst(X))
head(mark(X)) → mark(head(X))
natsFrom(mark(X)) → mark(natsFrom(X))
s(mark(X)) → mark(s(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
tail(mark(X)) → mark(tail(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
snd(ok(X)) → ok(snd(X))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
fst(ok(X)) → ok(fst(X))
head(ok(X)) → ok(head(X))
natsFrom(ok(X)) → ok(natsFrom(X))
s(ok(X)) → ok(s(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
tail(ok(X)) → ok(tail(X))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = 2·x1 + x2 + x3 + x4   
POL(U12(x1, x2)) = x1 + x2   
POL(active(x1)) = 2·x1   
POL(afterNth(x1, x2)) = x1 + 2·x2   
POL(and(x1, x2)) = 2·x1 + 2·x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = 2·x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = x1   
POL(sel(x1, x2)) = x1 + 2·x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x1 + x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = 2·x1 + 2·x2   
POL(tt) = 0   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
QDP
                ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(mark(X)) → TOP(proper(X)) at position [0] we obtained the following new rules:

TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(mark(0)) → TOP(ok(0))
TOP(mark(tt)) → TOP(ok(tt))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(nil)) → TOP(ok(nil))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
QDP
                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(mark(0)) → TOP(ok(0))
TOP(mark(tt)) → TOP(ok(tt))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(nil)) → TOP(ok(nil))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(X)) → TOP(active(X))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(ok(X)) → TOP(active(X)) at position [0] we obtained the following new rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(ok(afterNth(x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(x1))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(and(tt, x0))) → TOP(mark(x0))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
QDP
                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(afterNth(x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(mark(0)) → TOP(ok(0))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tt)) → TOP(ok(tt))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(nil)) → TOP(ok(nil))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(x1))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(and(tt, x0))) → TOP(mark(x0))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
QDP
                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(and(tt, x0))) → TOP(mark(x0))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(and(tt, x0))) → TOP(mark(x0))
The remaining pairs can at least be oriented weakly.

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = x3 + x4   
POL(U12(x1, x2)) = x1 + x2   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(and(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 1   

The following usable rules [17] were oriented:

pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(fst(X)) → fst(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(head(X)) → head(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(0) → ok(0)
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(N)
active(fst(pair(X, Y))) → mark(X)
active(and(tt, X)) → mark(X)
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
tail(ok(X)) → ok(tail(X))
tail(mark(X)) → mark(tail(X))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(mark(X1), X2) → mark(sel(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(head(X)) → head(active(X))
active(fst(X)) → fst(active(X))
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
QDP
                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(x1))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(sel(x0, x1))) → TOP(mark(head(afterNth(x0, x1))))
The remaining pairs can at least be oriented weakly.

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(x1))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = x3 + x4   
POL(U12(x1, x2)) = x1 + x2   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(and(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(fst(X)) → fst(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(head(X)) → head(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(0) → ok(0)
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(N)
active(fst(pair(X, Y))) → mark(X)
active(and(tt, X)) → mark(X)
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
tail(ok(X)) → ok(tail(X))
tail(mark(X)) → mark(tail(X))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(mark(X1), X2) → mark(sel(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(head(X)) → head(active(X))
active(fst(X)) → fst(active(X))
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
QDP
                                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(afterNth(x0, x1))) → TOP(mark(snd(splitAt(x0, x1))))
The remaining pairs can at least be oriented weakly.

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = x3 + x4   
POL(U12(x1, x2)) = x1 + x2   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = 1 + x2   
POL(and(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(fst(X)) → fst(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(head(X)) → head(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(0) → ok(0)
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(N)
active(fst(pair(X, Y))) → mark(X)
active(and(tt, X)) → mark(X)
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
tail(ok(X)) → ok(tail(X))
tail(mark(X)) → mark(tail(X))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(mark(X1), X2) → mark(sel(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(head(X)) → head(active(X))
active(fst(X)) → fst(active(X))
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
QDP
                                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(snd(pair(x0, x1)))) → TOP(mark(x1))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(snd(pair(x0, x1)))) → TOP(mark(x1))
The remaining pairs can at least be oriented weakly.

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = x3 + x4   
POL(U12(x1, x2)) = x1 + x2   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = 1 + x2   
POL(and(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = 1 + x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(fst(X)) → fst(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(head(X)) → head(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(0) → ok(0)
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(N)
active(fst(pair(X, Y))) → mark(X)
active(and(tt, X)) → mark(X)
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
tail(ok(X)) → ok(tail(X))
tail(mark(X)) → mark(tail(X))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(mark(X1), X2) → mark(sel(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(head(X)) → head(active(X))
active(fst(X)) → fst(active(X))
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
QDP
                                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(head(cons(x0, x1)))) → TOP(mark(x0))
The remaining pairs can at least be oriented weakly.

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = x3 + x4   
POL(U12(x1, x2)) = x1 + x2   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(and(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 1 + x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = x1 + x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(fst(X)) → fst(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(head(X)) → head(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(0) → ok(0)
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(N)
active(fst(pair(X, Y))) → mark(X)
active(and(tt, X)) → mark(X)
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
tail(ok(X)) → ok(tail(X))
tail(mark(X)) → mark(tail(X))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(mark(X1), X2) → mark(sel(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(head(X)) → head(active(X))
active(fst(X)) → fst(active(X))
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
QDP
                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(take(x0, x1))) → TOP(mark(fst(splitAt(x0, x1))))
The remaining pairs can at least be oriented weakly.

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = x3 + x4   
POL(U12(x1, x2)) = x1 + x2   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(and(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = 1 + x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(fst(X)) → fst(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(head(X)) → head(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(0) → ok(0)
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(N)
active(fst(pair(X, Y))) → mark(X)
active(and(tt, X)) → mark(X)
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
tail(ok(X)) → ok(tail(X))
tail(mark(X)) → mark(tail(X))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(mark(X1), X2) → mark(sel(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(head(X)) → head(active(X))
active(fst(X)) → fst(active(X))
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
QDP
                                                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(fst(pair(x0, x1)))) → TOP(mark(x0))
The remaining pairs can at least be oriented weakly.

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 1   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = x3 + x4   
POL(U12(x1, x2)) = x1 + x2   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(and(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = 1 + x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = x1   
POL(take(x1, x2)) = 1 + x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(fst(X)) → fst(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(head(X)) → head(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(0) → ok(0)
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(N)
active(fst(pair(X, Y))) → mark(X)
active(and(tt, X)) → mark(X)
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
tail(ok(X)) → ok(tail(X))
tail(mark(X)) → mark(tail(X))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(mark(X1), X2) → mark(sel(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(head(X)) → head(active(X))
active(fst(X)) → fst(active(X))
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
QDP
                                                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(tail(cons(x0, x1)))) → TOP(mark(x1))
The remaining pairs can at least be oriented weakly.

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = x3 + x4   
POL(U12(x1, x2)) = x1 + x2   
POL(active(x1)) = x1   
POL(afterNth(x1, x2)) = x2   
POL(and(x1, x2)) = x2   
POL(cons(x1, x2)) = x1 + x2   
POL(fst(x1)) = x1   
POL(head(x1)) = x1   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = x1 + x2   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = x2   
POL(snd(x1)) = x1   
POL(splitAt(x1, x2)) = x2   
POL(tail(x1)) = 1 + x1   
POL(take(x1, x2)) = x2   
POL(tt) = 0   

The following usable rules [17] were oriented:

pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(fst(X)) → fst(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(head(X)) → head(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(tail(X)) → tail(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(0) → ok(0)
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(head(cons(N, XS))) → mark(N)
active(fst(pair(X, Y))) → mark(X)
active(and(tt, X)) → mark(X)
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
tail(ok(X)) → ok(tail(X))
tail(mark(X)) → mark(tail(X))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(mark(X1), X2) → mark(sel(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
active(take(X1, X2)) → take(X1, active(X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
active(sel(X1, X2)) → sel(X1, active(X2))
active(sel(X1, X2)) → sel(active(X1), X2)
active(take(X1, X2)) → take(active(X1), X2)
active(tail(X)) → tail(active(X))
active(head(X)) → head(active(X))
active(fst(X)) → fst(active(X))
active(s(X)) → s(active(X))
active(natsFrom(X)) → natsFrom(active(X))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
QDP
                                                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U11(tt, x0, x1, x2))) → TOP(mark(U12(splitAt(x0, x2), x1)))
TOP(ok(splitAt(0, x0))) → TOP(mark(pair(nil, x0)))
The remaining pairs can at least be oriented weakly.

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = 1   
POL(U12(x1, x2)) = 0   
POL(active(x1)) = 0   
POL(afterNth(x1, x2)) = 0   
POL(and(x1, x2)) = 0   
POL(cons(x1, x2)) = 0   
POL(fst(x1)) = 0   
POL(head(x1)) = 0   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = 0   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = 0   
POL(proper(x1)) = 0   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 0   
POL(snd(x1)) = 0   
POL(splitAt(x1, x2)) = 1   
POL(tail(x1)) = 0   
POL(take(x1, x2)) = 0   
POL(tt) = 0   

The following usable rules [17] were oriented:

pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
tail(ok(X)) → ok(tail(X))
tail(mark(X)) → mark(tail(X))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(mark(X1), X2) → mark(sel(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
QDP
                                                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U12(pair(x0, x1), x2))) → TOP(mark(pair(cons(x2, x0), x1)))
TOP(ok(natsFrom(x0))) → TOP(mark(cons(x0, natsFrom(s(x0)))))
TOP(ok(splitAt(s(x0), cons(x1, x2)))) → TOP(mark(U11(tt, x0, x1, x2)))
The remaining pairs can at least be oriented weakly.

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2, x3, x4)) = 0   
POL(U12(x1, x2)) = 1   
POL(active(x1)) = 0   
POL(afterNth(x1, x2)) = 0   
POL(and(x1, x2)) = 0   
POL(cons(x1, x2)) = 0   
POL(fst(x1)) = 0   
POL(head(x1)) = 0   
POL(mark(x1)) = x1   
POL(natsFrom(x1)) = 1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(pair(x1, x2)) = 0   
POL(proper(x1)) = 0   
POL(s(x1)) = 0   
POL(sel(x1, x2)) = 0   
POL(snd(x1)) = 0   
POL(splitAt(x1, x2)) = 1   
POL(tail(x1)) = 0   
POL(take(x1, x2)) = 0   
POL(tt) = 0   

The following usable rules [17] were oriented:

pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
tail(ok(X)) → ok(tail(X))
tail(mark(X)) → mark(tail(X))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(mark(X1), X2) → mark(sel(X1, X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ QDPOrderProof
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
                                          ↳ QDP
                                            ↳ QDPOrderProof
                                              ↳ QDP
                                                ↳ QDPOrderProof
                                                  ↳ QDP
                                                    ↳ QDPOrderProof
                                                      ↳ QDP
                                                        ↳ QDPOrderProof
                                                          ↳ QDP
                                                            ↳ QDPOrderProof
                                                              ↳ QDP
                                                                ↳ QDPOrderProof
QDP

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(splitAt(x0, x1))) → TOP(splitAt(active(x0), x1))
TOP(ok(U11(x0, x1, x2, x3))) → TOP(U11(active(x0), x1, x2, x3))
TOP(mark(and(x0, x1))) → TOP(and(proper(x0), proper(x1)))
TOP(mark(afterNth(x0, x1))) → TOP(afterNth(proper(x0), proper(x1)))
TOP(ok(natsFrom(x0))) → TOP(natsFrom(active(x0)))
TOP(ok(fst(x0))) → TOP(fst(active(x0)))
TOP(mark(tail(x0))) → TOP(tail(proper(x0)))
TOP(ok(and(x0, x1))) → TOP(and(active(x0), x1))
TOP(mark(head(x0))) → TOP(head(proper(x0)))
TOP(mark(snd(x0))) → TOP(snd(proper(x0)))
TOP(ok(take(x0, x1))) → TOP(take(x0, active(x1)))
TOP(mark(fst(x0))) → TOP(fst(proper(x0)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(head(x0))) → TOP(head(active(x0)))
TOP(mark(pair(x0, x1))) → TOP(pair(proper(x0), proper(x1)))
TOP(ok(take(x0, x1))) → TOP(take(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(sel(x0, x1))) → TOP(sel(x0, active(x1)))
TOP(ok(pair(x0, x1))) → TOP(pair(active(x0), x1))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(snd(x0))) → TOP(snd(active(x0)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(x0, active(x1)))
TOP(mark(U11(x0, x1, x2, x3))) → TOP(U11(proper(x0), proper(x1), proper(x2), proper(x3)))
TOP(mark(splitAt(x0, x1))) → TOP(splitAt(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(sel(x0, x1))) → TOP(sel(active(x0), x1))
TOP(ok(splitAt(x0, x1))) → TOP(splitAt(x0, active(x1)))
TOP(mark(sel(x0, x1))) → TOP(sel(proper(x0), proper(x1)))
TOP(mark(natsFrom(x0))) → TOP(natsFrom(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(afterNth(x0, x1))) → TOP(afterNth(active(x0), x1))
TOP(ok(pair(x0, x1))) → TOP(pair(x0, active(x1)))
TOP(ok(tail(x0))) → TOP(tail(active(x0)))
TOP(mark(take(x0, x1))) → TOP(take(proper(x0), proper(x1)))

The TRS R consists of the following rules:

active(U11(tt, N, X, XS)) → mark(U12(splitAt(N, XS), X))
active(U12(pair(YS, ZS), X)) → mark(pair(cons(X, YS), ZS))
active(afterNth(N, XS)) → mark(snd(splitAt(N, XS)))
active(and(tt, X)) → mark(X)
active(fst(pair(X, Y))) → mark(X)
active(head(cons(N, XS))) → mark(N)
active(natsFrom(N)) → mark(cons(N, natsFrom(s(N))))
active(sel(N, XS)) → mark(head(afterNth(N, XS)))
active(snd(pair(X, Y))) → mark(Y)
active(splitAt(0, XS)) → mark(pair(nil, XS))
active(splitAt(s(N), cons(X, XS))) → mark(U11(tt, N, X, XS))
active(tail(cons(N, XS))) → mark(XS)
active(take(N, XS)) → mark(fst(splitAt(N, XS)))
active(U11(X1, X2, X3, X4)) → U11(active(X1), X2, X3, X4)
active(U12(X1, X2)) → U12(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(active(X1), X2)
active(splitAt(X1, X2)) → splitAt(X1, active(X2))
active(pair(X1, X2)) → pair(active(X1), X2)
active(pair(X1, X2)) → pair(X1, active(X2))
active(cons(X1, X2)) → cons(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(active(X1), X2)
active(afterNth(X1, X2)) → afterNth(X1, active(X2))
active(snd(X)) → snd(active(X))
active(and(X1, X2)) → and(active(X1), X2)
active(fst(X)) → fst(active(X))
active(head(X)) → head(active(X))
active(natsFrom(X)) → natsFrom(active(X))
active(s(X)) → s(active(X))
active(sel(X1, X2)) → sel(active(X1), X2)
active(sel(X1, X2)) → sel(X1, active(X2))
active(tail(X)) → tail(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
tail(mark(X)) → mark(tail(X))
tail(ok(X)) → ok(tail(X))
sel(mark(X1), X2) → mark(sel(X1, X2))
sel(X1, mark(X2)) → mark(sel(X1, X2))
sel(ok(X1), ok(X2)) → ok(sel(X1, X2))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
natsFrom(mark(X)) → mark(natsFrom(X))
natsFrom(ok(X)) → ok(natsFrom(X))
head(mark(X)) → mark(head(X))
head(ok(X)) → ok(head(X))
fst(mark(X)) → mark(fst(X))
fst(ok(X)) → ok(fst(X))
and(mark(X1), X2) → mark(and(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
snd(mark(X)) → mark(snd(X))
snd(ok(X)) → ok(snd(X))
afterNth(mark(X1), X2) → mark(afterNth(X1, X2))
afterNth(X1, mark(X2)) → mark(afterNth(X1, X2))
afterNth(ok(X1), ok(X2)) → ok(afterNth(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
pair(mark(X1), X2) → mark(pair(X1, X2))
pair(X1, mark(X2)) → mark(pair(X1, X2))
pair(ok(X1), ok(X2)) → ok(pair(X1, X2))
splitAt(mark(X1), X2) → mark(splitAt(X1, X2))
splitAt(X1, mark(X2)) → mark(splitAt(X1, X2))
splitAt(ok(X1), ok(X2)) → ok(splitAt(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2, X3, X4) → mark(U11(X1, X2, X3, X4))
U11(ok(X1), ok(X2), ok(X3), ok(X4)) → ok(U11(X1, X2, X3, X4))
proper(U11(X1, X2, X3, X4)) → U11(proper(X1), proper(X2), proper(X3), proper(X4))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(splitAt(X1, X2)) → splitAt(proper(X1), proper(X2))
proper(pair(X1, X2)) → pair(proper(X1), proper(X2))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(afterNth(X1, X2)) → afterNth(proper(X1), proper(X2))
proper(snd(X)) → snd(proper(X))
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(fst(X)) → fst(proper(X))
proper(head(X)) → head(proper(X))
proper(natsFrom(X)) → natsFrom(proper(X))
proper(s(X)) → s(proper(X))
proper(sel(X1, X2)) → sel(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(tail(X)) → tail(proper(X))
proper(take(X1, X2)) → take(proper(X1), proper(X2))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.